<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			function Person(name,chinese,math){
				this.name=name;
				this.chinese=chinese;
				this.math=math;
			}
			Person.prototype.name=function(){
			return name;
		}
			Person.prototype.chinese=function(){
			return chinese;
		}
			Person.prototype.math=function(){
			return math;
		}
			function Student(name,chinese,math,age){
				Person.call(this,name,chinese,math);
				this.age=age;
			}
			Student.prototype.age=function(){
				return age;
			}
			Student.prototype=new Person();
			var stu1=new Student("张三","99","100","19");
			document.write("姓名："+stu1.name+"<br />语文："+stu1.chinese+"<br />数学："+stu1.math+"<br />年龄："+stu1.age);
		</script>
	</body>
</html>
